package com.example.last.dao;

import com.example.last.entity.Account;
import com.example.last.entity.Doctor;
import com.example.last.entity.Params;
import com.example.last.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {

    User findByNameAndPassword(@Param("username") String username, @Param("password") String password);

    List<User> findBySearch(@Param("params") Params params);

    void add(User user);

    void update(User user);

    void delete(Integer id);

    User selectByPrimaryKey(Integer id);
    User selectByUsername(@Param("username") String username);

    void updatePassword(Account account);

    User findByName(@Param("username") String username);
}
